
package com.android.matmanual;


import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;



public class OFNTest extends Activity 
{
	
	LinearLayout mUp;
	LinearLayout mDown;
	LinearLayout mLeft;
	LinearLayout mRight;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
     
		setContentView(R.layout.ofn_test);
		setTitle(R.string.ofn_title);
		
		mUp = (LinearLayout) findViewById(R.id.up);	
		mUp.setOnClickListener(new OnClickListener() {
			
			public void onClick(View arg0) {
				// TODO Auto-generated method stub

			}
		});
		
		mDown = (LinearLayout) findViewById(R.id.down);	
		mDown.setOnClickListener(new OnClickListener() {
			
			public void onClick(View arg0) {
				// TODO Auto-generated method stub

			}
		});
		
		mLeft = (LinearLayout) findViewById(R.id.left);	
		mLeft.setOnClickListener(new OnClickListener() {
			
			public void onClick(View arg0) {
				// TODO Auto-generated method stub

			}
		});
		
		mRight = (LinearLayout) findViewById(R.id.right);	
		mRight.setOnClickListener(new OnClickListener() {
			
			public void onClick(View arg0) {
				// TODO Auto-generated method stub

			}
		});
		
	
	}
	
	@Override
	protected void onStop() {
		// TODO Auto-generated method stub
        finish();
		super.onStop();
	}

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		int result = TestControl.GetKeyEvent(keyCode);
		if (result != TestControl.DO_NOTHING) {
			setResult(result);
			finish();
	    }
	    return true;
	}
}
		 